#include <stdio.h>
#include <string.h>
static char *prompt(char *line, int size)
{
    char *retval;

    do
    {
        printf(">> ");
        retval = fgets(line, size, stdin);
    } while (retval && *line == '\n');
    printf("retval:%s", retval);
    line[strlen(line) - 1] = '\0';
    return retval;
}
int main(int argc, char const *argv[])
{
    int size = 1 << 12;
    char buffer[size];
    char *line = buffer;
    prompt(line, size);
    return 0;
}
